﻿<u:UObject x:Class="UTable.Tests.UGridViewTest"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:u="clr-namespace:UTable.Objects.Controls;assembly=UTable.Core"
    xmlns:uc="clr-namespace:UTable.Objects.Controls;assembly=UTable.Objects"
    Height="400" Width="600">
    <u:UGrid>
        <u:UGrid.ColumnDefinitions>
            <ColumnDefinition Width="200" />
            <ColumnDefinition Width="*" />
        </u:UGrid.ColumnDefinitions>
        <StackPanel Grid.Column="0" Margin="5, 50, 5, 5">
            <TextBlock Foreground="White" FontSize="16" Text="Layout Orientation: " Margin="5, 5, 5, 5"/>
            <u:UComboBox SelectedIndex="0" FontSize="16" Foreground="White" x:Name="DirectionBox" SelectionChanged="DirectionBox_SelectionChanged">
                <u:UComboBoxItem>LeftRightDown</u:UComboBoxItem>
                <u:UComboBoxItem>TopDownRight</u:UComboBoxItem>
            </u:UComboBox>
            <TextBlock Foreground="White" FontSize="16" Text="Item Size Scale:" Margin="5, 20, 5, 5"/>
            <u:USlider Minimum="0.5" Maximum="2" ValueChanged="USlider_ValueChanged" Value="1" x:Name="ItemScaleSlider"/>
            <TextBlock Foreground="White" FontSize="16" Text="Layout Margin Scale:" Margin="5, 20, 5, 5"/>
            <u:USlider Minimum="0.5" Maximum="2" Value="1" x:Name="LayoutMarginScaleSlider" ValueChanged="LayoutMarginScaleSlider_ValueChanged"/>
            <TextBlock Foreground="White" FontSize="16" Text="Cell Margin Scale:" Margin="5, 20, 5, 5"/>
            <u:USlider Minimum="0.5" Maximum="2" Value="1" x:Name="CellMarginScaleSlider" ValueChanged="CellMarginScaleSlider_ValueChanged"/>
        </StackPanel>
        <Border Grid.Column="1" Margin="10" Background="SkyBlue">
            <uc:UGridView x:Name="GridViewer" LayoutDirection="LeftRightDown"  LayoutMargin="20, 5, 20, 5" DropItemOut="False">
                <uc:UBookPreviewControl PagesFolderPath="E:/books/book1"/>
                <uc:UBookPreviewControl PagesFolderPath="E:/books/book2"/>
                <uc:UBookPreviewControl PagesFolderPath="E:/books/book3"/>
                <uc:UBookPreviewControl PagesFolderPath="E:/books/book4"/>
                <uc:UBookPreviewControl PagesFolderPath="E:/books/book1"/>
                <uc:UBookPreviewControl PagesFolderPath="E:/books/book2"/>
                <uc:UBookPreviewControl PagesFolderPath="E:/books/book3"/>
                <uc:UBookPreviewControl PagesFolderPath="E:/books/book4"/>
                <uc:UBookPreviewControl PagesFolderPath="E:/books/book1"/>
            </uc:UGridView>
        </Border>
    </u:UGrid>
</u:UObject>
